import {
	createRouter,
	createWebHistory
} from 'vue-router'
import Todolist from '../views/todolist/index.vue'


const routes = [
	{
		path: '/',
		// redirect 可以实现重定向,指向新路径
		redirect: '/todolist'
	},
	{
		path: '/todolist',
		name: 'Todolist',
		component: Todolist
	}
]

const router = createRouter({
	history: createWebHistory(process.env.BASE_URL),
	routes
})

export default router
